//////public class Date {
//////    public int year;
//////    public int month;
//////    public int day;
//////    public void setDay(int y, int m, int d) {
//////        year = y;
//////        month = m;
//////        day = d;
//////    }
//////    public void printDate() {
//////        System.out.println(year + "/" + month + "/" + day);
//////    }
//////
//////    public static void main(String[] args) {
//////        // 构造三个日期类型的对象 d1 d2 d3
//////        Date d1 = new Date();
//////        Date d2 = new Date();
//////        Date d3 = new Date();
//////        // 对d1，d2，d3的日期设置
//////        d1.setDay(2020, 9, 15);
//////        d2.setDay(2020, 9, 16);
//////        d3.setDay(2020, 9, 17);
//////        // 打印日期中的内容
//////        d1.printDate();
//////        d2.printDate();
//////        d3.printDate();
//////    }
//////}
//////public class Date {
//////    public int year;
//////    public int month;
//////    public int day;
//////
//////    public void setDay(int year, int month, int day) {
//////        this.year = year;
//////        this.month = month;
//////        this.day = day;
//////    }
//////
//////    public void printDate() {
//////        System.out.println(this.year + "/" + this.month + "/" + this.day);
//////    }
//////}
////
//////public class Date {
//////    public int year;
//////    public int month;
//////    public int day;
//////
////    // 构造方法：
////    // 名字与类名相同，没有返回值类型，设置为void也不行
////    // 一般情况下使用public修饰
////    // 在创建对象时由编译器自动调用，并且在对象的生命周期内只调用一次
//////    public Date(int year, int month, int day) {
//////        this.year = year;
//////        this.month = month;
//////        this.day = day;
//////        System.out.println("Date(int,int,int)方法被调用了");
//////    }
//////
//////    public void printDate() {
//////        System.out.println(year + "-" + month + "-" + day);
//////    }
//////
//////    public static void main(String[] args) {
//////        // 此处创建了一个Date类型的对象，并没有显式调用构造方法
//////        Date d = new Date(2023, 11, 5); // 输出Date(int,int,int)方法被调用了
//////        d.printDate();
//////    }
//////}
////    public class Date {
////        public int year;
////        public int month;
////        public int day;
////
////        // 无参构造方法
////        public Date() {
////            this.year = 1900;
////            this.month = 1;
////            this.day = 1;
////        }
////
////        // 带有三个参数的构造方法
////        public Date(int year, int month, int day) {
////            this.year = year;
////            this.month = month;
////            this.day = day;
////        }
////
////        public void printDate() {
////            System.out.println(year + "-" + month + "-" + day);
////        }
////
////        public static void main(String[] args) {
////            Date d = new Date();
////            d.printDate();
////        }
////    }
//public class Date {
//    public int year;
//    public int month;
//    public int day;
//
//    // 无参构造方法--内部给各个成员赋值初始值，该部分功能与三个参数的构造方法重复
//    // 此处可以在无参构造方法中通过this调用带有三个参数的构造方法
//    // 但是this(1900,1,1);必须是构造方法中第一条语句
//    public Date() {
//        //System.out.println(year); 注释取消掉，编译会失败,因为this(...)必须是构造方法中第一条语句
//        this(1900, 1, 1);
//        this.year = 1900;
//        this.month = 1;
//        this.day = 1;
//    }
//
//    // 带有三个参数的构造方法
//    public Date(int year, int month, int day) {
//        this.year = year;
//        this.month = month;
//        this.day = day;
//    }
//}
public class Date {
    public int year = 1900;
    public int month = 1;
    public int day = 1;
    public Date(){
    }
    public Date(int year, int month, int day) {
    }
    public static void main(String[] args) {
        Date d1 = new Date(2021,6,9);
        Date d2 = new Date();
    }
}